//
// Created by Administrator on 2021/10/20.
//

#ifndef PARTJOB_C___ANYLIST_H
#define PARTJOB_C___ANYLIST_H
#include "node.h"
class AnyList {
public:
    AnyList() : ptrToFirst(nullptr), count(0) {}
    // Other member functions of the class...
    void insertBack(int num);
    bool search(int num) const;
    void replaceData(int num1, int num2);
    void deleteElem(int num);
    int getFirstElem() const;
    bool isEmpty() const;
    void deleteLastNode();
    bool compareLists(AnyList anyList) const;
    Node * getHead() { return ptrToFirst; }
    int getCount() { return count; }
private:
    // Pointer to point to the first node in the list.
    Node *ptrToFirst;
    // Variable to store the number of nodes in the list.
    int count;
};
#endif //PARTJOB_C___ANYLIST_H
